package com.immunology.service.impl;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.immunology.dao.MedicineCardDao;
import com.immunology.domain.MedicineCard;
import com.immunology.domain.Role;
import com.immunology.exception.DaoException;
import com.immunology.service.MedicineCardService;

@Service
public class MedicineCardServiceImpl implements MedicineCardService{

	@Autowired
	private MedicineCardDao medicineCardDao;
	
	@Override
	public MedicineCard findById(Long id) throws DaoException {
		return medicineCardDao.findById(id);
	}

	@Override
	public List<MedicineCard> getAll() throws DaoException {
		return medicineCardDao.getAll();
	}

	@Override
	public void saveOrUpdate(Collection<MedicineCard> entities)
			throws DaoException {
		medicineCardDao.saveOrUpdate(entities);
	}

	@Override
	public void saveOrUpdate(MedicineCard... entities) throws DaoException {
		medicineCardDao.saveOrUpdate(entities);
	}

	@Override
	public void update(Collection<MedicineCard> entities) throws DaoException {
		medicineCardDao.update(entities);
	}

	@Override
	public void update(MedicineCard... entities) throws DaoException {
		medicineCardDao.update(entities);
	}

	@Override
	public void delete(Collection<MedicineCard> entities) throws DaoException {
		medicineCardDao.delete(entities);
	}
	
	@Override
	public void delete(MedicineCard... entities) throws DaoException {
		medicineCardDao.delete(entities);
	}

	@Override
	public void deleteAll() throws DaoException {
		medicineCardDao.deleteAll();
	}

	@Override
	public void save(Collection<MedicineCard> entities) throws DaoException {
		medicineCardDao.save(entities);
	}

	@Override
	public void save(MedicineCard... entities) throws DaoException {
		medicineCardDao.save(entities);
	}

}
